import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

class circleContainer extends StatelessWidget {
  final double swiperHeight;
  final double swiperWidth;

  circleContainer({
    required this.swiperHeight,
    required this.swiperWidth,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: const EdgeInsets.fromLTRB(10, 10, 10, 10),
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(60),
        boxShadow: [
          BoxShadow(
            color: Colors.black.withOpacity(0.5), // 阴影颜色及透明度
            blurRadius: 20, // 模糊半径
            offset: const Offset(5, 5), // 阴影偏移量
          ),
        ],
        gradient: const LinearGradient(
          begin: Alignment.topLeft,
          end: Alignment.bottomRight,
          colors: [
            Color(0xffd5a982), // 渐变色起始颜色
            Color(0xfff1e3d6),
            Color(0xffffffff), // 渐变色结束颜色
          ],
        ),
      ),
      child: Column(
        children: <Widget>[
          const SizedBox(
            height: 20.0,
          ),
          //用户名+简介
          const Row(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              SizedBox(width: 40.0),
              CircleAvatar(
                radius: 19.0, // 设置头像的半径
              ),
              SizedBox(width: 20.0),
              Expanded(
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start, // 文本左对齐
                  children: [
                    Text(
                      'Leo',
                      style:
                          TextStyle(fontSize: 15, fontWeight: FontWeight.bold),
                    ),
                    Text(
                      '岭南传统文化多姿多彩，展现广府文化',
                      style: TextStyle(fontSize: 10),
                    ),
                    SizedBox(height: 16.0), // 垂直间距
                  ],
                ),
              ),
            ],
          ),
          //图片
          Container(
            width: swiperWidth * 0.73,
            height: swiperHeight * 0.32,
            color: Colors.blue,
            child: const Text(
              'pictures',
              textAlign: TextAlign.center,
              style: TextStyle(fontSize: 20),
            ),
          ),
          const Column(
            crossAxisAlignment: CrossAxisAlignment.start, // 文本左对齐
            children: [
              Text(
                '寻找热爱岭南文化的志愿者',
                style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600),
              ),
              SizedBox(height: 3.0), // 垂直间距
              Text(
                '寻找伙伴一起去参加儿童节期间的志愿活动，到岭\n南金融博物馆做志愿者，志愿者负责讲解文物讲述\n文物历史来源，管理现场秩序。',
                style: TextStyle(fontSize: 11),
              ),
              SizedBox(height: 16.0), // 垂直间距
            ],
          ),
          const Row(
            children: [
              SizedBox(
                width: 40,
              ),
              Column(
                crossAxisAlignment: CrossAxisAlignment.start, // 文本左对齐
                children: [
                  Text(
                    '#岭南文化 #志愿者 #文化爱好者',
                    style: TextStyle(
                        fontSize: 11,
                        color: Color.fromARGB(255, 16, 9, 110),
                        fontWeight: FontWeight.bold),
                  ),
                  Text(
                    '性别：不限',
                    style: TextStyle(fontSize: 10),
                  ),
                  Text(
                    '搭子人数：13/20',
                    style: TextStyle(fontSize: 10),
                  ),
                  Text(
                    '截止日期：5.29',
                    style: TextStyle(fontSize: 10),
                  ),
                  Text(
                    '活动地址：岭南金融博物馆',
                    style: TextStyle(fontSize: 10),
                  ),
                  Text(
                    '18：20',
                    style: TextStyle(fontSize: 10),
                  ),
                  Text(
                    'IP：广州',
                    style: TextStyle(fontSize: 10),
                  ),
                ],
              ),
              Row(
                children: [
                  Icon(
                    Icons.favorite_border,
                    color: Color.fromARGB(255, 142, 49, 24),
                  ),
                  SizedBox(width: 8.0),
                  Icon(
                    Icons.chat,
                    color: Color.fromARGB(255, 142, 49, 24),
                  ),
                  SizedBox(width: 8.0),
                  Icon(
                    Icons.telegram,
                    color: Color.fromARGB(255, 142, 49, 24),
                  ),
                ],
              )
            ],
          )
        ],
      ),
    );
  }
}
